<!DOCTYPE html>
<html>
<head>
    <#include "/layout/baseHeader.ftl" />
</head>
<body>
<div id="app">
    <i-form ref="myForm" :model="form" :rules="ruleValidate" :label-width="80">
        <Form-item label="用户账号">
            <i-input v-model="form.userAccount"></i-input>
        </Form-item>
        <Form-item label="用户名">
            <i-input v-model="form.userName"></i-input>
        </Form-item>
        <Form-item label="渠道CODE">
            <i-input v-model="form.branchCode"></i-input>
        </Form-item>
        <Form-item label="统一渠道编码">
            <i-input v-model="form.branchName"></i-input>
        </Form-item>
        <Form-item label="BOSS工号">
            <i-input v-model="form.bossno"></i-input>
        </Form-item>
        <Form-item label="portal账号">
            <i-input v-model="form.portalno"></i-input>
        </Form-item>
        <Form-item label="分公司">
            <i-input v-model="form.county"></i-input>
        </Form-item>
        <Form-item label="手机">
            <i-input v-model="form.userMobile"></i-input>
        </Form-item>
        <Form-item label="邮箱">
            <i-input v-model="form.useremail"></i-input>
        </Form-item>
    </i-form>
</div>
<script>
    const m_apis = {
        getModelEx(p_id){
            return PB.apiRoute('/api/sys/userzj/getModelEx?id=' + p_id, 'GET')
        }
    };
    let vm = new Vue({
        el: '#app',
        data() {
            return {
                apis:m_apis,
                form: {},
                ruleValidate: []
            }
        },
        created(){
            if (PB.getPara('id')) {
                this.getModel(PB.getPara('id'));
            }
        },
        methods: {
            getModel(id){
                let that = this;
                PB.ajax(this.apis.getModelEx(id), function (d) {
                    that.form = d.data;
                });
            }
        }
    });

    function save() {
        vm.save();
    }
</script>
</body>
</html>
